# coding:utf8
'''
网页下载器
'''
# 导入urllib（python3特有）
from urllib import request

# 实现下载器类
class HtmlDownload(object):
    # 下载网页
    def download(self, url):
        if url is None:
            return None

        response = request.urlopen(url)
        if response.status != 200:
            return None
        else:
            return response.read()